﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace BaseData.Infrastructure.Interfaces
{
    public interface IBaseRepository<T> where T : class
    {
        Task<int> AddAsync(T entity);
        Task<int> UpdateAsync(T entity);
        Task<int> AddAll(List<T> values);
        Task<int> UpdateAll(List<T> values);
        IQueryable<T> GetAll();
        Task<T> GetById(int id);
        IQueryable<T> GetAlls(Expression<Func<T,bool>> expression);
        Task<int> DelAsync(int id);
    }
}
